import("io", true)
import("CArray")

sdata = [];
for(j=12; j<=20; j++)
{
stime = (new Date()).getTime()
for( i=0; i<Math.pow(2, j); i++ )
  sdata[i] = i
ftime = (new Date()).getTime()
print("Total elapsed time for filling up native jS array with "+i+" elements of array(in miliseconds) is "+(ftime-stime))


cdata = new CArray.Integer(Math.pow(2, j));
stime = (new Date()).getTime()
for( i=0; i<Math.pow(2, j); i++ )
  cdata[i] = i
ftime = (new Date()).getTime()
print("Total elapsed time for filling up CArray with "+i+" elements (in miliseconds) is "+(ftime-stime))
}
